package com.fishingwithme.infrastructure.dtos.credit;

import com.fishingwithme.domain.credit.CreditRecord;
import lombok.Data;

import java.util.Date;

@Data
public class CreditRecordDto {
    private Long id;
    private Long userId;
    private Integer point;
    private String reason;
    private Long bizId;
    private Date createdDate;
    private Long createdBy;

    public static CreditRecordDto toDto(CreditRecord r) {
        CreditRecordDto dto = new CreditRecordDto();
        dto.setId(r.getId());
        dto.setPoint(r.getPoint());
        dto.setReason(r.getReason());
        dto.setBizId(r.getBizId());
        dto.setCreatedDate(r.getCreatedDate());
        return dto;
    }
}
